package org.sourceprojects.pannonia.test.impl;

import org.sourceprojects.pannonia.Event;
import org.sourceprojects.pannonia.EventManager;
import org.sourceprojects.pannonia.EventManagerFactory;
import org.sourceprojects.pannonia.annotations.EventHandler;

public class AnnotatedPojoEventHandler {

	public AnnotatedPojoEventHandler() {
		EventManager eventManager = EventManagerFactory.newInstance();
		eventManager.registerEventHandler(this);
	}
	
	@EventHandler( { EventFoo.class })
	public String handleEvent1() {
		return "handleEvent1";
	}

	@EventHandler( { EventFoo.class })
	public String handleEvent2(Event event) {
		return "handleEvent2";
	}

	@EventHandler( { EventFoo.class })
	public String handleEvent3(EventFoo event) {
		return "handleEvent3";
	}

	@EventHandler( { EventFoo.class, EventBar.class })
	public String handleEvent4(Event event) {
		return "handleEvent4";
	}

	@EventHandler( { EventFoo.class, EventBar.class })
	public String handleEvent5(EventFoo event) {
		return "handleEvent5";
	}

	@EventHandler( { EventFoo.class, EventBar.class })
	public String handleEvent6(EventBar event) {
		return "handleEvent6";
	}
}
